package com.gxa.weixing.core.pojo;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author ChenJ
 * @date 2022/01/06 9:21
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@Table(name = "tb_gold_record")
public class GoldRecord {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(name = "id", value = "金币记录编号", dataType = "Long", example = "1")
    @Column(name = "gold_record_id")
    private long id;

    @ApiModelProperty(name = "id", value = "用户金币表编号", dataType = "Long", example = "1")
    @Column(name = "user_gold_id")
    private long goldId;

    @ApiModelProperty(name = "id", value = "过期时间", dataType = "Date", example = "1")
    @Column(name = "gold_record_expiration_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date expirationTime;

    @ApiModelProperty(name = "id", value = "金币操作记录(描述)", dataType = "String", example = "提现金币 ")
    @Column(name = "gold_record_operating")
    private String operating;

    @ApiModelProperty(name = "id", value = "操作数额", dataType = "BigDecimal", example = "50")
    @Column(name = "gold_record_number")
    private BigDecimal number;
    @ApiModelProperty(name = "id", value = "操作状态 增加 true/ 减少false", dataType = "Boolean", example = "0")
    @Column(name = "gold_record_state")
    private Boolean state;
}
